﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace FS_2013_GUI
{
    /// <summary>
    /// Логика взаимодействия для FSMain.xaml
    /// </summary>
    public partial class FSMain : Window
    {
        public FSMain(string login)
        {
            InitializeComponent();
            userLoginLbl.Content = login;
        }

        public FSMain()
        {
            InitializeComponent();
        }

        private void exitBtn_Click(object sender, RoutedEventArgs e)
        {
            Global.cn.Send("disconnect");
            Thread.Sleep(500);
            Global.cn.Disconnect();
            Environment.Exit(1);
        }

        private void logoutBtn_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }

        private void downlodBtn_Click(object sender, RoutedEventArgs e)
        {
            DownloadWindow dlWind = new DownloadWindow(this);
            this.Hide();
            dlWind.ShowDialog();
        }
    }
}
